package com.atguigu.tingshu.album.client;

import com.atguigu.tingshu.album.client.impl.AlbumInfoDegradeFeignClient;
import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.album.AlbumInfo;
import com.atguigu.tingshu.model.album.BaseCategory3;
import com.atguigu.tingshu.model.album.BaseCategoryView;
import com.atguigu.tingshu.model.album.TrackInfo;
import com.atguigu.tingshu.vo.album.AlbumStatVo;
import com.atguigu.tingshu.vo.album.TrackListVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-album", fallback = AlbumInfoDegradeFeignClient.class, path = "/rpc/inner/albuminfo")
public interface AlbumInfoFeignClient {


    @GetMapping("/getAlbumInfoAndAttrValue/{albumId}")
    Result<AlbumInfo> getAlbumInfoAndAttrValue(@PathVariable(name = "albumId") Long albumId);

    @GetMapping("/getAlbumCategory/{albumId}")
    Result<BaseCategoryView> getAlbumCategory(@PathVariable(name = "albumId") Long albumId);

    @GetMapping("/getAlbumStat/{albumId}")
    Result<AlbumStatVo> getAlbumStat(@PathVariable(name = "albumId") Long albumId);

    @GetMapping("/getBaseCategory3ListByC1Id/{c1Id}")
    Result<List<BaseCategory3>> getBaseCategory3ListByC1Id(@PathVariable(name = "c1Id") Long c1Id);

    @GetMapping("/getAllCategory1Id")
    Result<List<Long>> getAllCategory1Id();

    @PostMapping("/getTrackList")
    Result<List<TrackListVo>> getTrackList(@RequestBody List<Long> trackIdList);

    @GetMapping("/getAlbumInfoIdList")
    Result<List<Long>> getAlbumInfoIdList();

    @GetMapping("/getTrackListByCurrentTrackId/{userId}/{trackId}/{trackCount}")
    Result<List<TrackInfo>> getTrackListByCurrentTrackId(@PathVariable(name = "userId") Long userId,
                                                         @PathVariable(name = "trackId") Long trackId,
                                                         @PathVariable(name = "trackCount") Integer trackCount);

    @GetMapping("/getTrackInfoByTrackId/{trackId}")
    Result<TrackInfo> getTrackInfoByTrackId(@PathVariable(name = "trackId") Long trackId);

    @GetMapping("/getAlbumInfoByTrackId/{trackId}")
    Result<AlbumInfo> getAlbumInfoByTrackId(@PathVariable(name = "trackId") Long trackId);
}